package com.ie.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ie.entity.Messages;
import com.ie.service.MessagesService;
import com.ie.mapper.MessagesMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author admin
* @description 针对表【messages】的数据库操作Service实现
* @createDate 2025-03-02 22:16:12
*/
@Service
public class MessagesServiceImpl
    implements MessagesService{
    @Resource
    private MessagesMapper messagesMapper;

    @Override
    public List<Messages> getAllMessages() {
         return  messagesMapper.getAllMessages();
    }

    @Override
    public boolean deleteMessage(String id) {

        return messagesMapper.deleteMessage(id);
    }

    @Override
    public boolean addMessage(String username, String message) {

        return messagesMapper.addMessage(username,message);
    }
}




